// Gradients
#gradient {
  .horizontal(@startColor: #555, @endColor: #333) {
    background-color: @endColor;
    background-image: -moz-linear-gradient(left, @startColor, @endColor); /**#firefox#**/
    background-image: -ms-linear-gradient(left, @startColor, @endColor); /**#IE10#**/
    background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); /** #safari# **/
    background-image: -webkit-linear-gradient(left, @startColor, @endColor); /** #chrome# #safari# **/
    background-image: -o-linear-gradient(left, @startColor, @endColor); /**#opera#**/
    background-image: linear-gradient(left, @startColor, @endColor);
    //background-repeat: repeat-x;
    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); /** #ie8# #ie9# **/
    //*filter: -;/** ie7**/
      .reset-filter();

  }
  .vertical(@startColor: #555, @endColor: #333) {
    background-color: mix(@startColor, @endColor, 60%);
    background-image: -moz-linear-gradient(top, @startColor, @endColor); /**#firefox#**/
    background-image: -ms-linear-gradient(top, @startColor, @endColor); /**#IE10#**/
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); /** #safari# **/
    background-image: -webkit-linear-gradient(top, @startColor, @endColor); /** #chrome# #safari# **/
    background-image: -o-linear-gradient(top, @startColor, @endColor); /**#opera#**/
    background-image: linear-gradient(top, @startColor, @endColor);
    //background-repeat: repeat-x;
    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); /** #ie8# #ie9# **/
    //*filter: -;/** ie7**/
    .reset-filter();
  }
  .horizontalWithAlpha(@fromColor: #555, @toColor: #333,@opacity:0.5) {
    @startColor: fadeout(@fromColor, percentage(@opacity));
    @endColor: fadeout(@toColor, percentage(@opacity));
    background-color: @endColor;
    background-image: -moz-linear-gradient(left, @startColor, @endColor); /**#firefox#**/
    background-image: -ms-linear-gradient(left, @startColor, @endColor); /**#IE10#**/
    background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); /** #safari# **/
    background-image: -webkit-linear-gradient(left, @startColor, @endColor); /** #chrome# #safari# **/
    background-image: -o-linear-gradient(left, @startColor, @endColor); /**#opera#**/
    background-image: linear-gradient(left, @startColor, @endColor); 
    //background-repeat: repeat-x;
    @alphaHEX:floor(255 * @opacity);
    @hexAlphaFromColor: `"#" + (@{alphaHEX}).toString(16) + "@{fromColor}".substring(1,7)`; //define the color with Alpha
    @hexAlphaToColor: `"#" + (@{alphaHEX}).toString(16) + "@{toColor}".substring(1,7)`; //define the color with Alpha
    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr=%d, endColorstr=%d, GradientType=1)",@hexAlphaFromColor,@hexAlphaToColor)); /** #ie8# #ie9# **/
    // *filter: -;/** ie7**/
  }
  .verticalWithAlpha(@fromColor: #555, @toColor: #333,@opacity:0.5) {
    @startColor: fadeout(@fromColor, percentage(@opacity));
    @endColor: fadeout(@toColor, percentage(@opacity));
    background-color: mix(@startColor, @endColor, 60%);
    background-image: -moz-linear-gradient(top, @startColor, @endColor); /**#firefox#**/
    background-image: -ms-linear-gradient(top, @startColor, @endColor); /**#IE10#**/
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); /** #safari# **/
    background-image: -webkit-linear-gradient(top, @startColor, @endColor); /** #chrome# #safari# **/
    background-image: -o-linear-gradient(top, @startColor, @endColor); /**#opera#**/
    background-image: linear-gradient(top, @startColor, @endColor); 
    //background-repeat: repeat-x;
     @alphaHEX:floor(255 * @opacity);
    @hexAlphaFromColor: `"#" + (@{alphaHEX}).toString(16) + "@{fromColor}".substring(1,7)`; //define the color with Alpha
    @hexAlphaToColor: `"#" + (@{alphaHEX}).toString(16) + "@{toColor}".substring(1,7)`; //define the color with Alpha
     filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr=%d, endColorstr=%d, GradientType=0)",@hexAlphaFromColor,@hexAlphaToColor)); /** #ie8# #ie9# **/
    //*filter: -;/** ie7**/
  }
  .directional(@startColor: #555, @endColor: #333, @deg: 45deg) {
    background-color: @endColor;
    background-repeat: repeat-x;
    background-image: -moz-linear-gradient(@deg, @startColor, @endColor); /**#firefox#**/
    background-image: -ms-linear-gradient(@deg, @startColor, @endColor); /**#IE10#**/
    background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); /** #chrome# #safari# **/
    background-image: -o-linear-gradient(@deg, @startColor, @endColor); /**#opera#**/
    background-image: linear-gradient(@deg, @startColor, @endColor); 
  }
  .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
    background-color: mix(@midColor, @endColor, 80%);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));/** #safari# **/
    background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor); /** #chrome# #safari# **/
    background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor);/**#firefox#**/
    background-image: -ms-linear-gradient(@startColor, @midColor @colorStop, @endColor); /**#IE10#**/
    background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor); /**#opera#**/
    background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor);
    //background-repeat: no-repeat;
    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); /** #ie8# #ie9# **/
    // *filter: -;/** ie7**/
  }
  .radial(@innerColor: #555, @outerColor: #333)  {
    background-color: @outerColor;
    background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor));/** #safari# **/
    background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor);/** #chrome# #safari# **/
    background-image: -moz-radial-gradient(circle, @innerColor, @outerColor);/**#firefox#**/
    background-image: -ms-radial-gradient(circle, @innerColor, @outerColor);/**#IE10#**/
	background-image: radial-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor));
    //background-repeat: no-repeat;
    // Opera cannot do radial gradients yet
  }
  .striped(@color, @angle: -45deg) {
    background-color: @color;
    background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent));/** #safari# **/
    background-image: -webkit-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);/** #chrome# #safari# **/
    background-image: -moz-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);/**#firefox#**/
    background-image: -ms-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);/**#IE10#**/
    background-image: -o-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);/**#opera#**/
    background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
  }
}
// Reset filters for IE
.reset-filter() {
    *filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
}